home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / optans10.zip / OPTANSI.REF < prev    next >
Text File  |  1992-06-14  |  12KB  |  226 lines

  1. *******************************************************************************
  2.  
  3.                                OptANSI Library
  4.                                  version 1.0
  5.                          Copyright 1992 Michael Dannov
  6.  
  7.                   Optimizing ANSI Output Library for Borland C
  8.  
  9. *******************************************************************************
  10.                                QUICK REFERENCE
  11. *INCLUDE FILES*
  12. --FILENAME----USAGE/INFORMATION-----------------------------------------------
  13.   OPTANSI.H   Use in all applications and functions that use OptANSI functions
  14.               Declares macros, prototypes, and some structures
  15.   AUSER.H     Use if you prefer to use OptANSI functions as procedures instead
  16.               of functions that return a string, make sure to modify the macro
  17.               aout() to call an output function of your choice
  18.  
  19.  
  20. *GLOBAL VARIABLES*
  21. --VARIABLE---TYPE---DESCRIPTION-----------------------------------------------
  22.   acurattr   char   Current color
  23.   axpos      char   Current x position on screen
  24.   aypos      char   Current y position on screen
  25.   ashortcuts char   Flags for available ANSI shortcuts/behavior
  26.   astr      char15  Buffer area for ANSI result string
  27.  
  28.  
  29. *MACRO VALUES*
  30. --MACRO--VAL--NOTES-----------------------------------------------------------
  31.   ESC    27
  32.  
  33. ashotcuts macros
  34. --MACRO--BIT--RULES-----------------------------------------------------------
  35.   aBKSP   1   True if backspace (char 8, ^H) is nondestructive
  36.   aLF     2   True if linefeed (char 10, ^J) moves cursor down only, if
  37.               false, assumes LF is equivalent to CR/LF combination
  38.   aCR     4   True if carriage return (char 13, ^M) moves the cursor to
  39.               left margin on the same line only
  40.   aCLRSCR 8   True if clear screen (char 12, ^L) clears the entire screen
  41.               to the current color, Telix requires this true
  42.   aRESET  64  True if reset color (ESC[m) resets the color to lightgray on
  43.               black (7), almost always true, QModem might require this true
  44.   aNANSI  128 True if you want to use NANSI or FANSI extensions.
  45.  
  46. Colors
  47. --MACRO-------VAL--DESCRIPTION------------------------------------------------
  48.   BLACK        0   Dark colors
  49.   BLUE         1
  50.   GREEN        2
  51.   CYAN         3
  52.   RED          4
  53.   MAGENTA      5
  54.   BROWN        6
  55.   LIGHTGRAY    7
  56.   DARKGRAY     8   Light colors
  57.   LIGHTBLUE    9
  58.   LIGHTGREEN   10
  59.   LIGHTCYAN    11
  60.   LIGHTRED     12
  61.   LIGHTMAGENTA 13
  62.   YELLOW       14
  63.   WHITE        15
  64.   HIGHLIGHT    8   Add to Highlight Dark Colors Only
  65.   BLINK        128 Add to Blink any color
  66.  
  67. setmodes
  68. --MACRO--------VAL--NOTES-----------------------------------------------------
  69.   BW40          0   Text 40x25, 16 colors  (ANSI colors override B&W modes)
  70.   C40           1   Text 40x25, 16 colors
  71.   BW80          2   Text 80x25, 16 colors  (ANSI colors override B&W modes)
  72.   C80           3   Text 80x25, 16 colors
  73.   G320_200      4   Graphics 320x200, 4 colors
  74.   G320_200GR    5   Graphics 320x200, 4 grey colors
  75.   G640_200BW    6   Graphics 640x200, 2 colors - black & white
  76.   G320_200V     13  Graphics 320x200, 16 colors, (VGA)
  77.   G640_200V     14  Graphics 640x200, 16 colors, (VGA)
  78.   G640_350V     16  Graphics 640x350, 16 colors, (VGA)
  79.   G640_480BWV   17  Graphics 640x480, 2 colors - black & white, (VGA)
  80.   G640_480V     18  Graphics 640x480, 16 colors, (VGA)
  81.   G300_200V     19  Graphics 300x200, 256 colors, (VGA)
  82.   ROWS43        43  Switch to 43 row mode, NANSI ONLY  ROWS50        50  Switch to 50 row mode, NANSI ONLY  aCURSORWRAP   7   Changes cursorwrap variables
  83.   aBIOSTTY      97  Changes bios or writetty mode, NANSI ONLY  aWRITE_TTY    97  same as above
  84.   aBIOSTTY      97  same as above
  85.   aFASTSCROLL   98  Changes to fast scroll mode, NANSI ONLY  aGRAPHICSCURSOR 99 Changes graphics cursor, NANSI ONLY
  86.  
  87.  
  88.  
  89. *FUNCTIONS*
  90. --FUNCTION DECLARATION | DESCRIPTION------------------------CATAGORY/NOTES----
  91.  
  92.   char *ablink()                                            COLOR
  93.     Set blink bit of current color
  94.   char *aclrbol()                                           MISC / NONSTD
  95.     Clear line from cursor to beginning of line
  96.   char *aclreol()                                           MISC
  97.     Clears the line from the cursor to the end of the line
  98.   char *aclrline()                                          MISC / NONSTD
  99.     Clears entire line
  100.   char *aclrscr()                                           MISC
  101.     Clears the screen and homes the cursor
  102.   char *aclrscrabove()                                      MISC / NONSTD
  103.     Clears screen above and left of cursor position
  104.   char *aclrscrbelow()                                      MISC / NONSTD
  105.     Clears screen below and right of cursor position
  106.   char *acmd(char num, char cmd)                            MISC
  107.     Creates a universal ANSI string based on its parameters
  108.   char *acolor(char nc)                                     COLOR
  109.     Change current color/attribute
  110.   char *acursorwrap()                                       MISC
  111.     Turns cursorwrap on
  112.   char *adelchar(char x)                                    MISC / NONSTD
  113.     Deletes characters starting at cursor
  114.   char *adelline(char y)                                    MISC / NONSTD
  115.     Delete lines starting at current
  116.   char *adim()                                              COLOR
  117.     Clear highlight bit of current color
  118.   char *adown(char y)                                       LOCATE
  119.     Move the cursor down y positions
  120.   char *aforcecolor(char nc)                                COLOR
  121.     Forces color to new color value ignoring optimizations
  122.   char *aforcegotoxy(char x, char y)                        LOCATE
  123.     Forces location of the cursor to new x and y ignoring optimizations
  124.   char *agotoxy(char x, char y)                             LOCATE
  125.     Locates the cursor to new x and y location
  126.   char *ahighlight()                                        COLOR
  127.     Set highlight bit of current color
  128.   char *ahighvideo()                                        COLOR
  129.     Set highlight bit of current color
  130.   char *ahome()                                             LOCATE
  131.     Move cursor to top left corner of screen: 1, 1
  132.   int ainit()                                               MISC 
  133.     Initialize OptANSI functions and variables
  134.   char *ainschar(char x)                                    MISC / NONSTD
  135.     Insert chars starting at cursor
  136.   char *ainsline(char y)                                    MISC / NONSTD
  137.     Insert a line before the current line
  138.   char *ainvisible(equation)                                COLOR / NONSTD
  139.     Set current color to a color defined by invisible command
  140.   char *akeyboard(int key, char *str, char *buf)            MISC
  141.     Reassign keyboard keys
  142.   char *aleft(char x)                                       LOCATE
  143.     Move the cursor left x positions
  144.   char *alowvideo()                                         COLOR
  145.     Clear highlight bit of current color
  146.   char *amode(int mode, char cmd)                           MISC
  147.     Function for use with asetmode and aresetmode
  148.   char *anoblink()                                          COLOR
  149.     Clear blink bit of current color
  150.   char *anocursorwrap()                                     MISC
  151.     Turns cursorwrap off
  152.   char *anohighlight()                                      COLOR
  153.     Clear highlight bit of current color
  154.   char *anoinvisible(equation)                              COLOR / NANSI
  155.     Turn invisible off
  156.   char *anormvideo()                                        COLOR
  157.     Clear highlight bit of current color
  158.   anotshort(char nflags)                                    INIT
  159.     Define ashortcuts = all flags on except nflags
  160.   char *aresetcolor()                                       COLOR
  161.     Sets color to reset color, white on black (7)
  162.   char *aresetmode(int mode)                                MISC
  163.     Resets mode to an ANSI defined mode or changes display rules
  164.   char *arestorecursor()                                    LOCATE
  165.     Resto